package com.daxt.common.config;

import com.fasterxml.jackson.databind.DeserializationFeature;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableMBeanExport;
import org.springframework.jmx.support.RegistrationPolicy;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

@Configuration
@ServletComponentScan
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING) // 解决jmx重复注册bean的问题
//@EnableEurekaClient
//@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
//@ComponentScan(basePackages = { "org.jeecg.modules.jmreport"})
public class BaseConfig {


//	//TODO 注释测试yml配置信息生效
//	@Bean
//	public ObjectMapper serializingObjectMapper() {
//	  ObjectMapper objectMapper = new ObjectMapper();
//	  objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
////	  // add by lig 2021-07-30 jackson配置# 允许对象忽略json中不存在的属性
////	  objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
//	  objectMapper.registerModule(new JavaTimeModule());
//	  return objectMapper;
//	}
	
}
